home *** CD-ROM | disk | FTP | other *** search
- {$X+}
-
- {
- Example program to show the use of:
- - InstallUserFnt
- }
-
- PROGRAM example2;
- USES
- VGraph,Crt;
-
- VAR
- f : FILE;
- buf : POINTER;
- size : LONGINT;
-
- BEGIN
- Assign(f,ParamStr(1));
- Reset(f,1);
- size := FileSize(f);
-
- GetMem(buf,size);
- BlockRead(f,buf^,size);
- Close(f);
-
- InitVesa(V640x480x256);
- SetRGBPal(255,255,255,255);
- InstallUserFnt(buf);
- SetColor(GetMaxColor);
- SetTextStyle(DefaultFont,HorizDir,1);
- SetTextJustify(CenterText,CenterText);
- OutTextXY(GetMaxX DIV 2,100,'This is a test with a user installed font !');
- OutTextXY(GetMaxX DIV 2,200,'abcdefghifklmnopqrstuvwxyz');
- OutTextXY(GetMaxX DIV 2,300,'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
- ReadKey;
- CloseVesa;
- FreeMem(buf,size);
- WriteLn(TextWidth('X'),'x',TextHeight('X'));
- END.